﻿using UnityEngine;
using System.Collections;

public class TimeCounter : MonoBehaviour {

	public float counter = 0;
	public static int Hora = 0;
	public static int Minutos = 0;
	public static int Dia = 0;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		counter += Time.deltaTime;
		if(counter >= 1)
		{
			Minutos++;
			counter = 0;
		}
		if(Minutos >= 60)
		{
			Hora++;
			Minutos = 0;
		}
		if(Hora >= 60)
		{
			Dia++;
			Hora = 0;
		}
		
		guiText.text = Hora.ToString() + " : " + Minutos.ToString() ;
	}
}
